package com.hedl.practice.diyJava.reflex.study_01;

import com.hedl.practice.diyJava.reflex.study_01.tmp.Employee;

public class ClassTest {
    public static void main(String[] args) throws ClassNotFoundException {
        Class c = Employee.class;
        Class c1 = Class.forName("com.hedl.practice.diyJava.reflex.study_01.tmp.Employee");

        Employee employee = new Employee("小明","18","写代码",1,"java工程师",100000);

        Class c2 = employee.getClass();

        if (c == c1 && c == c2){
            System.out.println("c1、c2、c3 为同一个对象");
            System.out.println(c);
        }
    }
}
